package jike.demo29;

import javax.management.InvalidAttributeValueException;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description: 测试类
 * @date 2023/4/16 12:37
 */
public class testExecute {





    public static void main(String[] args) throws InvalidAttributeValueException {
        Long buyerId = 123L;
        Long sellerId = 234L;
        Long productId = 345L;
        Long orderId = 456L;

        Double amount = 100D;
        Transaction transaction = new Transaction(null, buyerId, sellerId, productId,orderId,amount);
        // 使用 mock 对象来替代真正的 RPC 服务
        transaction.setWalletRpcService(new MockWalletRpcServiceOne());
        boolean executedResult = transaction.execute();
        System.out.println("成功与否:"+executedResult);

    }
}
